import path from 'path';

import { defineConfig, presetAttributify, presetUno, presetIcons } from 'unocss';
import { requireFrom } from './utils.js';
import { cliDir, appDir, srcDir, yicodeDir, cacheDir } from './config.js';

const yiviteConfig = requireFrom(path.resolve(yicodeDir, 'yivite.config.js'));

let unocssConfig = defineConfig(
    Object.assign(
        {
            presets: [
                //
                presetUno(),
                presetAttributify()
            ]
        },
        yiviteConfig?.unocssConfig || {}
    )
);

export default unocssConfig;
